<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
            <title>Shampoo - My Lifestyle. My Reservation.</title>
            <link href='http://fonts.googleapis.com/css?family=Open+Sans:100,400,300,300italic,400italic,600,600italic,700,700italic,800,800italic&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css' />
            <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
            
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/jquery-ui.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/bootstrap.min.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/bootstrap-responsive.min.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/bootstrap-select.min.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/bootstrap-timepicker.min.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/default.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/custom.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/component.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/style.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/noJS.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/responsive.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/chosen.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/select2.css'); ?>

            <?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
            
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/jquery-ui1.10.3.js', CClientScript::POS_HEAD); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . "js/bootstrap.min.js"); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . "js/jquery.swing.js"); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . "js/jquery.easing.1.3.js"); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . "js/bootstrap-select.min.js"); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/prettify.js'); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/browser-search.js'); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/jquery.chosen.min.js'); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/modernizr.custom.js'); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/select2.min.js'); ?>

            <script src="<?php echo $this->assetDir ?>js/jquery.slimscroll.min.js"></script>
            <script src="<?php echo $this->assetDir ?>js/jquery.mobile.customized.min.js" type='text/javascript' ></script>
            
            <script src="<?php echo $this->assetDir ?>js/bootstrap-datepicker.js" type="text/javascript"></script>
            <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
            <script src="<?php echo $this->assetDir ?>js/jquery.gridrotator.js" type="text/javascript"></script>

    </head>

    <body class="home">
        <?php echo $this->renderPartial('//layouts/_main_header') ?> 
        <div id="loading">
            <div id="loading_content">
                <img src="<?php echo $this->assetDir ?>img/loading.gif"/>
                Loading ...
            </div>
        </div>
        <section class="middle account-page">
            <div class="wrapper-sub">
                <div class="row-fluid">
                    <div class="span12 wrapper-content">
                        <div class="main">
                            <div>
                                <?php if ($this->user != null): ?>
                                    <div class="row-fluid">
                                        <div class="span2">
                                            <div class="media">
                                                <a href="<?php echo $this->createUrl('account/index') ?>">
                                                <img class="media-object user-img" data-src="holder.js/64x64" 
                                                     alt="<?php echo $this->user->name; ?>"
                                                     src="<?php echo $this->user->getPublicPhoto() ?>" /></a>
                                                <div class="media-body profile-user">
                                                    <h4>
                                                        <a class="user-name" href="<?php echo $this->createUrl('account/index') ?>"><?php echo $this->user->name; ?></a>
                                                    </h4>
                                                    <?php if ($this->user->date_created): ?>
                                                        <b>Joined</b>: <?php echo $this->user->formartDate() ?><br/>
                                                    <?php endif; ?>
                                                    <b>Location</b>: <?php echo $this->user->fullAddress; ?>
                                                    <div class="clearfix-custom-10"></div>
                                                    <a href="<?php echo $this->createUrl('account/setting') ?>">
                                                    <button class="btn btn-info btn-shampoo">
                                                        Account Settings</button></a>
                                                    <div class="clearfix-custom-10"></div>
                                                    <a href="<?php echo $this->createUrl('account/changepwd') ?>">
                                                    <button class="btn btn-info">Change Password</button></a>
                                                </div>
                                            </div>
                                        </div>
                                        <?php echo $content; ?>
                                    </div>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <?php echo $this->renderPartial('//layouts/_footer') ?>

    </body>
    <script>
		//load ajax
		$("#loading").bind("ajaxStart", function() {
			$(this).show();
		}).bind("ajaxComplete", function() {
			$(this).hide();
		});
		
        function favourite(el, sid)
        {
<?php if (!Yii::app()->user->isGuest): ?>
                $.post('<?php echo $this->createUrl('favourite/check'); ?>', {
                    sid: sid
                }, function(data) {
                    if (data.status == 1) {//add
                        el.find('i').removeClass('icon-heart-white').addClass('icon-heart-pink');
                    }
                    else {//remove
                        el.find('i').removeClass('icon-heart-pink').addClass('icon-heart-white');
                    }
                }, 'json');
<?php else: ?>
                alert('<?php echo Yii::t('frontend','Please login or signup to add to My Favourites')?>');
<?php endif; ?>
        }
    </script>
    <script>
        function vote(el, sid, point)
        {
<?php if (!Yii::app()->user->isGuest): ?>
                $.ajax({
                    type: "GET",
                    url: "<?php echo $this->createUrl('search/AjaxVote') ?>",
                    data: {
                        sid: sid,
                        point: point
                    }
                }).done(function(msg) {
                    el.parent().html(msg);
                });
<?php else: ?>
                open_login();
<?php endif; ?>
        }
    </script>
    <script>(function() {
  var _fbq = window._fbq || (window._fbq = []);
  if (!_fbq.loaded) {
    var fbds = document.createElement('script');
    fbds.async = true;
    fbds.src = '//connect.facebook.net/en_US/fbds.js';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(fbds, s);
    _fbq.loaded = true;
  }
  _fbq.push(['addPixelId', '279943108864759']);
})();
window._fbq = window._fbq || [];
window._fbq.push(['track', 'PixelInitialized', {}]);
</script>
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?id=279943108864759&amp;ev=NoScript" /></noscript>
    <?php
        echo Options::getItem("js_google_tracking");
        echo Options::getItem("js_zopim_customer");
    ?>
</html>
